async function async1() {
    console.log('async1 start');
    await new Promise(resolve => {
        console.log('promise1');
        resolve('promise resolve');
    }).then (res => console.log(res));
    console.log('async1 success');
    return 'async1 end';
};

console.log('script end');
async1().then(res => console.log(res));
console.log('script end');


// script end -> async1 start -> promise1 -> script end -> promise resolve -> async1 success -> async1 end